package com.loong.loong.hik.task;

import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author jinyiang
 * @date 2023/4/13 14:54
 */
@Slf4j
@Component
public class TestTask {
	@XxlJob("testJob1")
	public void testJob() {
		String param = XxlJobHelper.getJobParam(); // 获取参数
		int shardIndex = XxlJobHelper.getShardIndex();// 获取分片参数
		log.info("调用xxl-job");
		XxlJobHelper.handleSuccess(); // v2.3.0 设置任务结果

	}
}
